ifneq ($(KMOD_TESTSUITE_ARCH_BUILD),1)
obj-m := mod-simple.o

# mod-foo depends on foo-x, and foo-x modules don't depend
# on anyone
obj-m += mod-foo-a.o
obj-m += mod-foo-b.o
obj-m += mod-foo-c.o
obj-m += mod-foo.o

# mod-loop: create loops in dependencies:
# 1) mod-loop-a  ->  mod-loop-b -> mod-loop-c -> mod-loop-a
#     |-> mod-loop-f    |-> mod-loop-f
#     \-> mod-loop-g    \-> mod-loop-g
# 2) mod-loop-d -> mod-loop-e -> mod-loop-d
# 3.1) mod-loop-h -> mod-loop-i -> mod-loop-j -> mod-loop-h
# 3.2) mod-loop-h -> mod-loop-i -> mod-loop-j -> mod-loop-k -> mod-loop-h

obj-m += mod-loop-a.o
obj-m += mod-loop-b.o
obj-m += mod-loop-c.o
obj-m += mod-loop-d.o
obj-m += mod-loop-e.o
obj-m += mod-loop-f.o
obj-m += mod-loop-g.o
obj-m += mod-loop-h.o
obj-m += mod-loop-i.o
obj-m += mod-loop-j.o
obj-m += mod-loop-k.o

# mod-fake-*: fake the respective modules in kernel with these aliases. Aliases
# list was taken from 3.5.4
obj-m += mod-fake-hpsa.o
obj-m += mod-fake-scsi-mod.o
obj-m += mod-fake-cciss.o

obj-m += mod-weakdep.o

obj-m += mod-softdep-a.o
obj-m += mod-softdep-b.o

else
# only build ARCH-specific module
ifeq ($(ARCH),)
    $(error ARCH must be set to a valid architecture)
endif
obj-m := mod-simple-$(ARCH).o
endif
